{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 13 pass语句"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1.【判断】if语句后可以出现空行来简化书写。（ ）\n",
    "\n",
    "A.√  \n",
    "B.×"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "答案：B"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2.【改错】改正下列Python代码，使其正常运行。  \n",
    "`\n",
    "d = [1.03,1.15,1.21,1.44,1.20,1.19] \n",
    "for i in range(6):\n",
    "    if (abs(d[i]-1) <= 0.2):\n",
    "       \n",
    "    else\n",
    "        print(d[i]+\"不合格\")`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "参考答案：  \n",
    "`\n",
    "d = [1.03,1.15,1.21,1.44,1.20,1.19] \n",
    "for i in range(6):\n",
    "    if (abs(d[i]-1) <= 0.2):\n",
    "        pass\n",
    "    else:\n",
    "        print(str(d[i])+\"不合格\")`"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
